Avoid a crash in the inspector under wayland
authorMatthias Clasen <mclasen@redhat.com>
Tue, 17 Feb 2015 14:30:56 +0000 (09:30 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 17 Feb 2015 14:37:18 +0000 (09:37 -0500)
The Wayland-specific popover code in GtkWindow was not doing the
right thing with the separate display connection we use for the
inspector.

gtk/gtkwindow.c

index 2b1bcca93648191c3cff306b8a0a95b4fe5eff88..54305d5a7541c3d0f2928ee34084d4fd2a69299c 100644 (file)
@@ -6326,7 +6326,7 @@ popover_realize (GtkWidget        *widget,
   if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (widget)))
     {
       attributes.window_type = GDK_WINDOW_SUBSURFACE;
-      parent_window = gdk_screen_get_root_window (gtk_widget_get_screen (widget));
+      parent_window = gdk_screen_get_root_window (gtk_widget_get_screen (GTK_WIDGET (window)));
     }
   else
 #endif